{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# The MIT License (MIT)\n",
    "\n",
    "# Copyright (c) 2020, NVIDIA CORPORATION.\n",
    "\n",
    "# Permission is hereby granted, free of charge, to any person obtaining a copy of\n",
    "# this software and associated documentation files (the \"Software\"), to deal in\n",
    "# the Software without restriction, including without limitation the rights to\n",
    "# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n",
    "# the Software, and to permit persons to whom the Software is furnished to do so,\n",
    "# subject to the following conditions:\n",
    "\n",
    "# The above copyright notice and this permission notice shall be included in all\n",
    "# copies or substantial portions of the Software.\n",
    "\n",
    "# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n",
    "# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n",
    "# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n",
    "# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n",
    "# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n",
    "# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Tutorial: Feature Engineering for Recommender Systems\n",
    "\n",
    "# 4. Feature Engineering - Numerical\n",
    "\n",
    "## 4.2. Normalization"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import IPython\n",
    "\n",
    "import pandas as pd\n",
    "import cudf\n",
    "import numpy as np\n",
    "import cupy\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "df_train = cudf.read_parquet('../data/train.parquet')\n",
    "df_valid = cudf.read_parquet('../data/valid.parquet')\n",
    "df_test = cudf.read_parquet('../data/test.parquet')\n",
    "\n",
    "df_train['brand'] = df_train['brand'].fillna('UNKNOWN')\n",
    "df_valid['brand'] = df_valid['brand'].fillna('UNKNOWN')\n",
    "df_test['brand'] = df_test['brand'].fillna('UNKNOWN')\n",
    "\n",
    "df_train['cat_0'] = df_train['cat_0'].fillna('UNKNOWN')\n",
    "df_valid['cat_0'] = df_valid['cat_0'].fillna('UNKNOWN')\n",
    "df_test['cat_0'] = df_test['cat_0'].fillna('UNKNOWN')\n",
    "\n",
    "df_train['cat_1'] = df_train['cat_1'].fillna('UNKNOWN')\n",
    "df_valid['cat_1'] = df_valid['cat_1'].fillna('UNKNOWN')\n",
    "df_test['cat_1'] = df_test['cat_1'].fillna('UNKNOWN')\n",
    "\n",
    "df_train['cat_2'] = df_train['cat_2'].fillna('UNKNOWN')\n",
    "df_valid['cat_2'] = df_valid['cat_2'].fillna('UNKNOWN')\n",
    "df_test['cat_2'] = df_test['cat_2'].fillna('UNKNOWN')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We generate some numerical features with the feature engineering from the previous notebooks."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "def target_encode(train, valid, col, target, kfold=5, smooth=20, gpu=True):\n",
    "    \"\"\"\n",
    "        train:  train dataset\n",
    "        valid:  validation dataset\n",
    "        col:   column which will be encoded (in the example RESOURCE)\n",
    "        target: target column which will be used to calculate the statistic\n",
    "    \"\"\"\n",
    "    \n",
    "    # We assume that the train dataset is shuffled\n",
    "    train['kfold'] = ((train.index) % kfold)\n",
    "    # We keep the original order as cudf merge will not preserve the original order\n",
    "    if gpu:\n",
    "        train['org_sorting'] = cupy.arange(len(train), dtype=\"int32\")\n",
    "    else:\n",
    "        train['org_sorting'] = np.arange(len(train), dtype=\"int32\")\n",
    "    # We create the output column, we fill with 0\n",
    "    col_name = '_'.join(col)\n",
    "    train['TE_' + col_name] = 0.\n",
    "    for i in range(kfold):\n",
    "        ###################################\n",
    "        # filter for out of fold\n",
    "        # calculate the mean/counts per group category\n",
    "        # calculate the global mean for the oof\n",
    "        # calculate the smoothed TE\n",
    "        # merge it to the original dataframe\n",
    "        ###################################\n",
    "        \n",
    "        df_tmp = train[train['kfold']!=i]\n",
    "        mn = df_tmp[target].mean()\n",
    "        df_tmp = df_tmp[col + [target]].groupby(col).agg(['mean', 'count']).reset_index()\n",
    "        df_tmp.columns = col + ['mean', 'count']\n",
    "        df_tmp['TE_tmp'] = ((df_tmp['mean']*df_tmp['count'])+(mn*smooth)) / (df_tmp['count']+smooth)\n",
    "        df_tmp_m = train[col + ['kfold', 'org_sorting', 'TE_' + col_name]].merge(df_tmp, how='left', left_on=col, right_on=col).sort_values('org_sorting')\n",
    "        df_tmp_m.loc[df_tmp_m['kfold']==i, 'TE_' + col_name] = df_tmp_m.loc[df_tmp_m['kfold']==i, 'TE_tmp']\n",
    "        train['TE_' + col_name] = df_tmp_m['TE_' + col_name].fillna(mn).values\n",
    "\n",
    "    \n",
    "    ###################################\n",
    "    # calculate the mean/counts per group for the full training dataset\n",
    "    # calculate the global mean\n",
    "    # calculate the smoothed TE\n",
    "    # merge it to the original dataframe\n",
    "    # drop all temp columns\n",
    "    ###################################    \n",
    "    \n",
    "    df_tmp = train[col + [target]].groupby(col).agg(['mean', 'count']).reset_index()\n",
    "    mn = train[target].mean()\n",
    "    df_tmp.columns = col + ['mean', 'count']\n",
    "    df_tmp['TE_tmp'] = ((df_tmp['mean']*df_tmp['count'])+(mn*smooth)) / (df_tmp['count']+smooth)\n",
    "    if gpu:\n",
    "        valid['org_sorting'] = cupy.arange(len(valid), dtype=\"int32\")\n",
    "    else:\n",
    "        valid['org_sorting'] = np.arange(len(valid), dtype=\"int32\")\n",
    "    df_tmp_m = valid[col + ['org_sorting']].merge(df_tmp, how='left', left_on=col, right_on=col).sort_values('org_sorting')\n",
    "    valid['TE_' + col_name] = df_tmp_m['TE_tmp'].fillna(mn).values\n",
    "    \n",
    "    valid = valid.drop('org_sorting', axis=1)\n",
    "    train = train.drop('kfold', axis=1)\n",
    "    train = train.drop('org_sorting', axis=1)\n",
    "    return(train, valid)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Index(['event_time', 'event_type', 'product_id', 'brand', 'price', 'user_id',\n",
       "       'user_session', 'target', 'cat_0', 'cat_1', 'cat_2', 'cat_3',\n",
       "       'timestamp', 'ts_hour', 'ts_minute', 'ts_weekday', 'ts_day', 'ts_month',\n",
       "       'ts_year'],\n",
       "      dtype='object')"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_train.columns"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "cats = [['cat_0'], ['cat_1'], ['cat_2'], ['cat_0', 'cat_1', 'cat_2'], ['ts_hour'], ['ts_weekday'], ['ts_weekday', 'ts_hour', 'cat_2', 'brand']]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "for cat in cats:\n",
    "    df_train, df_valid = target_encode(df_train, df_valid, cat, 'target')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "cats = ['brand', 'user_id', 'product_id', 'cat_0', 'cat_1', 'cat_2']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "def count_encode(train, valid, col, gpu=True):\n",
    "    \"\"\"\n",
    "        train:  train dataset\n",
    "        valid:  validation dataset\n",
    "        col:    column which will be count encoded (in the example RESOURCE)\n",
    "    \"\"\"\n",
    "    # We keep the original order as cudf merge will not preserve the original order\n",
    "    if gpu:\n",
    "        train['org_sorting'] = cupy.arange(len(train), dtype=\"int32\")\n",
    "    else:\n",
    "        train['org_sorting'] = np.arange(len(train), dtype=\"int32\")\n",
    "    \n",
    "    train_tmp = train[col].value_counts().reset_index()\n",
    "    train_tmp.columns = [col,  'CE_' + col]\n",
    "    df_tmp = train[[col, 'org_sorting']].merge(train_tmp, how='left', left_on=col, right_on=col).sort_values('org_sorting')\n",
    "    train['CE_' + col] = df_tmp['CE_' + col].fillna(0).values\n",
    "        \n",
    "    if gpu:\n",
    "        valid['org_sorting'] = cupy.arange(len(valid), dtype=\"int32\")\n",
    "    else:\n",
    "        valid['org_sorting'] = np.arange(len(valid), dtype=\"int32\")\n",
    "    df_tmp = valid[[col, 'org_sorting']].merge(train_tmp, how='left', left_on=col, right_on=col).sort_values('org_sorting')\n",
    "    valid['CE_' + col] = df_tmp['CE_' + col].fillna(0).values\n",
    "    \n",
    "    valid = valid.drop('org_sorting', axis=1)\n",
    "    train = train.drop('org_sorting', axis=1)\n",
    "    return(train, valid)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "CPU times: user 648 ms, sys: 1.26 s, total: 1.91 s\n",
      "Wall time: 1.91 s\n"
     ]
    }
   ],
   "source": [
    "%%time\n",
    "\n",
    "for cat in cats:\n",
    "    df_train, df_valid = count_encode(df_train, df_valid, cat, gpu=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>event_time</th>\n",
       "      <th>event_type</th>\n",
       "      <th>product_id</th>\n",
       "      <th>brand</th>\n",
       "      <th>price</th>\n",
       "      <th>user_id</th>\n",
       "      <th>user_session</th>\n",
       "      <th>target</th>\n",
       "      <th>cat_0</th>\n",
       "      <th>cat_1</th>\n",
       "      <th>...</th>\n",
       "      <th>TE_cat_0_cat_1_cat_2</th>\n",
       "      <th>TE_ts_hour</th>\n",
       "      <th>TE_ts_weekday</th>\n",
       "      <th>TE_ts_weekday_ts_hour_cat_2_brand</th>\n",
       "      <th>CE_brand</th>\n",
       "      <th>CE_user_id</th>\n",
       "      <th>CE_product_id</th>\n",
       "      <th>CE_cat_0</th>\n",
       "      <th>CE_cat_1</th>\n",
       "      <th>CE_cat_2</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2019-12-01 00:00:28 UTC</td>\n",
       "      <td>cart</td>\n",
       "      <td>17800342</td>\n",
       "      <td>zeta</td>\n",
       "      <td>66.90</td>\n",
       "      <td>550465671</td>\n",
       "      <td>22650a62-2d9c-4151-9f41-2674ec6d32d5</td>\n",
       "      <td>0</td>\n",
       "      <td>computers</td>\n",
       "      <td>desktop</td>\n",
       "      <td>...</td>\n",
       "      <td>0.280155</td>\n",
       "      <td>0.305423</td>\n",
       "      <td>0.410060</td>\n",
       "      <td>0.301241</td>\n",
       "      <td>10859</td>\n",
       "      <td>9</td>\n",
       "      <td>743</td>\n",
       "      <td>372964</td>\n",
       "      <td>51652</td>\n",
       "      <td>5058060</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2019-12-01 00:00:39 UTC</td>\n",
       "      <td>cart</td>\n",
       "      <td>3701309</td>\n",
       "      <td>polaris</td>\n",
       "      <td>89.32</td>\n",
       "      <td>543733099</td>\n",
       "      <td>a65116f4-ac53-4a41-ad68-6606788e674c</td>\n",
       "      <td>0</td>\n",
       "      <td>appliances</td>\n",
       "      <td>environment</td>\n",
       "      <td>...</td>\n",
       "      <td>0.350069</td>\n",
       "      <td>0.305249</td>\n",
       "      <td>0.410061</td>\n",
       "      <td>0.333539</td>\n",
       "      <td>50273</td>\n",
       "      <td>56</td>\n",
       "      <td>12</td>\n",
       "      <td>1527338</td>\n",
       "      <td>287043</td>\n",
       "      <td>213674</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2019-12-01 00:00:40 UTC</td>\n",
       "      <td>cart</td>\n",
       "      <td>3701309</td>\n",
       "      <td>polaris</td>\n",
       "      <td>89.32</td>\n",
       "      <td>543733099</td>\n",
       "      <td>a65116f4-ac53-4a41-ad68-6606788e674c</td>\n",
       "      <td>0</td>\n",
       "      <td>appliances</td>\n",
       "      <td>environment</td>\n",
       "      <td>...</td>\n",
       "      <td>0.351989</td>\n",
       "      <td>0.305235</td>\n",
       "      <td>0.410059</td>\n",
       "      <td>0.319065</td>\n",
       "      <td>50273</td>\n",
       "      <td>56</td>\n",
       "      <td>12</td>\n",
       "      <td>1527338</td>\n",
       "      <td>287043</td>\n",
       "      <td>213674</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2019-12-01 00:00:41 UTC</td>\n",
       "      <td>cart</td>\n",
       "      <td>3701309</td>\n",
       "      <td>polaris</td>\n",
       "      <td>89.32</td>\n",
       "      <td>543733099</td>\n",
       "      <td>a65116f4-ac53-4a41-ad68-6606788e674c</td>\n",
       "      <td>0</td>\n",
       "      <td>appliances</td>\n",
       "      <td>environment</td>\n",
       "      <td>...</td>\n",
       "      <td>0.351410</td>\n",
       "      <td>0.305370</td>\n",
       "      <td>0.410061</td>\n",
       "      <td>0.333539</td>\n",
       "      <td>50273</td>\n",
       "      <td>56</td>\n",
       "      <td>12</td>\n",
       "      <td>1527338</td>\n",
       "      <td>287043</td>\n",
       "      <td>213674</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2019-12-01 00:01:56 UTC</td>\n",
       "      <td>cart</td>\n",
       "      <td>1004767</td>\n",
       "      <td>samsung</td>\n",
       "      <td>235.60</td>\n",
       "      <td>579970209</td>\n",
       "      <td>c6946211-ce70-4228-95ce-fd7fccdde63c</td>\n",
       "      <td>0</td>\n",
       "      <td>construction</td>\n",
       "      <td>tools</td>\n",
       "      <td>...</td>\n",
       "      <td>0.460389</td>\n",
       "      <td>0.305449</td>\n",
       "      <td>0.410061</td>\n",
       "      <td>0.466269</td>\n",
       "      <td>2323417</td>\n",
       "      <td>9</td>\n",
       "      <td>317711</td>\n",
       "      <td>3363367</td>\n",
       "      <td>3307872</td>\n",
       "      <td>3172781</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 32 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                event_time event_type  product_id    brand   price    user_id  \\\n",
       "0  2019-12-01 00:00:28 UTC       cart    17800342     zeta   66.90  550465671   \n",
       "1  2019-12-01 00:00:39 UTC       cart     3701309  polaris   89.32  543733099   \n",
       "2  2019-12-01 00:00:40 UTC       cart     3701309  polaris   89.32  543733099   \n",
       "3  2019-12-01 00:00:41 UTC       cart     3701309  polaris   89.32  543733099   \n",
       "4  2019-12-01 00:01:56 UTC       cart     1004767  samsung  235.60  579970209   \n",
       "\n",
       "                           user_session  target         cat_0        cat_1  \\\n",
       "0  22650a62-2d9c-4151-9f41-2674ec6d32d5       0     computers      desktop   \n",
       "1  a65116f4-ac53-4a41-ad68-6606788e674c       0    appliances  environment   \n",
       "2  a65116f4-ac53-4a41-ad68-6606788e674c       0    appliances  environment   \n",
       "3  a65116f4-ac53-4a41-ad68-6606788e674c       0    appliances  environment   \n",
       "4  c6946211-ce70-4228-95ce-fd7fccdde63c       0  construction        tools   \n",
       "\n",
       "   ... TE_cat_0_cat_1_cat_2  TE_ts_hour  TE_ts_weekday  \\\n",
       "0  ...             0.280155    0.305423       0.410060   \n",
       "1  ...             0.350069    0.305249       0.410061   \n",
       "2  ...             0.351989    0.305235       0.410059   \n",
       "3  ...             0.351410    0.305370       0.410061   \n",
       "4  ...             0.460389    0.305449       0.410061   \n",
       "\n",
       "   TE_ts_weekday_ts_hour_cat_2_brand  CE_brand  CE_user_id  CE_product_id  \\\n",
       "0                           0.301241     10859           9            743   \n",
       "1                           0.333539     50273          56             12   \n",
       "2                           0.319065     50273          56             12   \n",
       "3                           0.333539     50273          56             12   \n",
       "4                           0.466269   2323417           9         317711   \n",
       "\n",
       "   CE_cat_0  CE_cat_1  CE_cat_2  \n",
       "0    372964     51652   5058060  \n",
       "1   1527338    287043    213674  \n",
       "2   1527338    287043    213674  \n",
       "3   1527338    287043    213674  \n",
       "4   3363367   3307872   3172781  \n",
       "\n",
       "[5 rows x 32 columns]"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_train.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Index(['event_time', 'event_type', 'product_id', 'brand', 'price', 'user_id',\n",
       "       'user_session', 'target', 'cat_0', 'cat_1', 'cat_2', 'cat_3',\n",
       "       'timestamp', 'ts_hour', 'ts_minute', 'ts_weekday', 'ts_day', 'ts_month',\n",
       "       'ts_year', 'TE_cat_0', 'TE_cat_1', 'TE_cat_2', 'TE_cat_0_cat_1_cat_2',\n",
       "       'TE_ts_hour', 'TE_ts_weekday', 'TE_ts_weekday_ts_hour_cat_2_brand',\n",
       "       'CE_brand', 'CE_user_id', 'CE_product_id', 'CE_cat_0', 'CE_cat_1',\n",
       "       'CE_cat_2'],\n",
       "      dtype='object')"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_train.columns"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Theory"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<b>*Normalization*</b> is required to enable neural networks to leverage numerical features. Tree-based models do not require normalization as they define the split independent of the scale of a feature. Without normalization, neural networks are difficult to train. The image visualizes the loss surface and the gradient updates for non-normalized input (left) and normalized input (right). <br><br>\n",
    "\n",
    "Source: https://www.jeremyjordan.me/batch-normalization/\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<img src='../images/normalization.png' width=50%>"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The reason is that different numerical features have different scales. When we combine the features in a hidden layer, the different scales make it more difficult to extract patterns from it."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Normalization Techniques"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "After we outline the importance for normalizing the numerical input feature, we will discuss different strategy to achieve a normal distributed input feature:\n",
    "1. Normalization with mean/std\n",
    "2. Log-based normalization\n",
    "3. Scale to 0-1\n",
    "4. Gauss Rank (separate notebook)\n",
    "5. Power transfomer"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 4.2.1 Normalization with mean/std"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The most common approach is to normalize a numerical feature by substracting the mean and divide the feature by the standard derviation:\n",
    "\n",
    "\\begin{equation} \\label{eq:normalize}\n",
    "X_{norm} = \\frac{X - mean_{X}}{\\sigma_{X}} \\sim \\mathcal{N}(0,\\,1)\\,\n",
    "\\end{equation}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "X = df_train['CE_product_id']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [],
   "source": [
    "X_norm = (X-X.mean())/X.std()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Our features does not follow a normal distribution"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Text(0.5, 1.0, 'Histogram normalised')"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAA7EAAADSCAYAAACcq0cwAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAAqd0lEQVR4nO3df7hdVX3v+/dHEKWK/JCUgwkarDl60aci5EKsHq8FgUCr4Z6DXqynREvNbQWPPff2KrQ9xaq02OecWqhKL0JqsLaAnFpSC8aI8nhsCxIEkR9SNhEuSfkRCT9Ej1jwe/+YY+PKzv6xQvbea6+d9+t51rPnHHPMOceYa+051nfNMcdMVSFJkiRJ0jB41qALIEmSJElSvwxiJUmSJElDwyBWkiRJkjQ0DGIlSZIkSUPDIFaSJEmSNDQMYiVJkiRJQ8MgVvNCkluTvHHQ5dDMS/LpJB9p0/8uyR0zsI+7k7xpurcrSZqabfpgJflgkr9s0y9O8niS3aZ5H9ck+fXp3KZ2LQaxmvPGCyiSvDPJ10fnq+qVVXXNFNtZnKSS7D5DRdUsq6r/UVUvH3Q5JEn9sU0fLlX1/1XV86vqqUGXReplECtNExvS8U33r7eSJM20YWrTh6ms0nQxiNW80PvLbpIjkmxI8liSB5L8Scv2tfb3kdY15rVJnpXk95Lck+TBJBcn2btnu6e0ZQ8l+S9j9vPBJJcn+cskjwHvbPv+pySPJLkvyceT7NGzvUryniR3Jvl+kg8n+bkk/9jKe1lv/jF1fGeSryf5r0keTvLdJMf3LH9RkrVJtiYZSfLunmUfbNu+uO331iRLJzmek+ZP8r+0rkCPtGVv6Vn26STnJ7kyyQ+AX2zH7f9JcnOSHyS5KMkBSa5q2/9ykn17tvG5JPcneTTJ15K8coJyvjHJpp75DyTZ3LZ5R5KjW/qzkpyR5K72Xl6WZL+e9X61533+3YmOiyRp5tmm99Wmjy3rNUk+0vb9eJK/S/LCJJ9tZbk+yeKebZyb5N627IYk/26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va9FrglHSWAY+27lnrgGOT7Nu6OR4LrGvLHkuyrPW1P6VnW4MwG/WaaB+zZsw9JP873XsKXdlOTjcq3cHAErrBjMb97LarFV8FTmrrjz1mo/U8CfhKyz9TdQpwEXB7Vf1Jz6J59Z5OVM/59p4mWZBknza9J3AM3f1GO1q26ay/5rcp/4/beeE5bXp/4HXAbbNWwk4/3yVm9fzbhynLPOYc9ha6//e5bqJ2ZE5L8m9aW0KSI+i+mw80QJmkDe81p453P2Weo8d6vPb1O2OyzalzSD9lnpVzSM2BkbkG9aIbWe2f6e7t+t1Bl6eP8r6UbhTBbwG3jpaZrl/81cCdwJeB/Vp6gE+0+n0bWNqzrV+jG1RlBHhXT/pSui/cdwEfBzJLdftrum6X/0p3X8Wps1GvifYxy/X8TKvHzXQnqgN78v9uK/Md9IwUPdFnt31GvtHq/zngOS39uW1+pC1/6QzX8/V03f9uBm5qrxPm23s6ST3n1XsK/DxwY6vPLcDvP9OyTVf9fc3v1yTniqXAhW36F9r/2bfa31MHVNbtPrvAh4C3tOlZPf9OU5n/iO57xrfofkh6xRwo83jt528Av9GWT9iOzPFyn95zrK8FfmEOlHmitm3OHu8+yzwXj/VE7eucPYf0WeYZP4eMfumTJEmSJGnO25W7E0uSJEmShoxBrCRJkiRpaBjESpIkSZKGhkGsJEmSJGloGMRKkiRJkoaGQawkSZIkaWgYxEqSJEmShoZBrCRJkiRpaPz/DqsKiRbfFSwAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 1152x216 with 2 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "fig, axs = plt.subplots(1, 2, figsize=(16,3))\n",
    "axs[0].hist(X.sample(frac=0.01).to_pandas(), bins=50)\n",
    "axs[0].set_title('Histogram non-normalised')\n",
    "axs[1].hist(X_norm.sample(frac=0.01).to_pandas(), bins=50)\n",
    "axs[1].set_title('Histogram normalised')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 4.2.2 Log-based normalization"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Some features are not normal distributed in the raw format. If they have a long-tail distribution, we can normalize them by applying the log function, first.\n",
    "\n",
    "\\begin{equation} \\label{eq:log}\n",
    "X_{log} = log(X+1) \\\\\n",
    "X_{log-norm} = \\frac{X_{log} - mean_{X_{log}}}{\\sigma_{X_{log}}} \\sim \\mathcal{N}(0,\\,1)\\,\n",
    "\\end{equation}\n",
    "\n",
    "User behavior data have often a long-tail distribution, such as # of clicks or # of purchases."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "X = df_train['CE_product_id'].to_pandas()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [],
   "source": [
    "X_log = np.log(X+1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [],
   "source": [
    "X_norm = (X_log-X_log.mean())/X_log.std()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Text(0.5, 1.0, 'Histogram normalised')"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAA7EAAADSCAYAAACcq0cwAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAAm20lEQVR4nO3de9xdZX3n/c9XzlUUkJRiAINjqoO+xlMGsHX6WKmcrIZnRh2sU6LDmGkFp50+fRRqpzieip2ZWqyWPlRSobUiZUpJFcSI8nJsBQkVQU4lIAxJA0TCQWTEor/nj3VFd+7ch51k33vfe+fzfr32a691rdN1rbXv+1q/ta51rVQVkiRJkiSNg6eMOgOSJEmS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/DP0NXX3yjfZ86orxus++A99JdrBlqnTPgfP9u+y1/g+6i6PNHneeWr+nOB38F+JU2fcbzogWe79N79vc1wM/MV162nPRJkiRJkrTg7crNiSVJkiRJY8YgVpIkSZI0NgxiJUmSJEljwyBWkiRJkjQ2DGIlSZIkSWPDIFaSJEmSNDYMYiVJkiRJY8MgVpIkSZI0Nv5/oxssagwl6KUAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 1152x216 with 2 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "fig, axs = plt.subplots(1, 2, figsize=(16,3))\n",
    "axs[0].hist(X.sample(frac=0.01), bins=50)\n",
    "axs[0].set_title('Histogram non-normalised')\n",
    "axs[1].hist(X_norm.sample(frac=0.01), bins=50)\n",
    "axs[1].set_title('Histogram normalised')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 4.2.3 Scale to 0-1"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Another technique is to scale the numerical features between 0-1.\n",
    "\n",
    "\\begin{equation} \\label{eq:01}\n",
    "X_{norm} = \\frac{X - min(X)}{max(X)-min(X)}\n",
    "\\end{equation}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [],
   "source": [
    "X = df_train['TE_cat_2']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(array([8.0000e+00, 8.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00,\n",
       "        0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00, 1.0000e+00,\n",
       "        3.2000e+01, 9.2000e+01, 1.5600e+02, 1.4000e+01, 4.9000e+01,\n",
       "        3.4800e+02, 9.1000e+01, 1.0510e+03, 1.1800e+02, 1.7700e+02,\n",
       "        1.4710e+03, 1.1560e+03, 3.5200e+02, 7.2900e+02, 3.4340e+03,\n",
       "        4.7980e+04, 1.9500e+03, 1.0770e+03, 4.4340e+03, 3.4220e+03,\n",
       "        2.9400e+02, 3.6550e+03, 0.0000e+00, 3.5900e+02, 1.6090e+03,\n",
       "        2.5380e+03, 9.9100e+02, 2.3800e+02, 0.0000e+00, 0.0000e+00,\n",
       "        0.0000e+00, 2.7500e+02, 0.0000e+00, 3.4905e+04, 8.4600e+02,\n",
       "        0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00, 7.5400e+02]),\n",
       " array([0.  , 0.02, 0.04, 0.06, 0.08, 0.1 , 0.12, 0.14, 0.16, 0.18, 0.2 ,\n",
       "        0.22, 0.24, 0.26, 0.28, 0.3 , 0.32, 0.34, 0.36, 0.38, 0.4 , 0.42,\n",
       "        0.44, 0.46, 0.48, 0.5 , 0.52, 0.54, 0.56, 0.58, 0.6 , 0.62, 0.64,\n",
       "        0.66, 0.68, 0.7 , 0.72, 0.74, 0.76, 0.78, 0.8 , 0.82, 0.84, 0.86,\n",
       "        0.88, 0.9 , 0.92, 0.94, 0.96, 0.98, 1.  ]),\n",
       " <BarContainer object of 50 artists>)"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYMAAAD7CAYAAACIYvgKAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAARNElEQVR4nO3dfazeZX3H8ffHVpRNEbRHQtriYbFuqyxTPIEal01hlgILJRkSyJRKOpoILG4zm3X7gw0kwSyTSYIPnTQUMwXm5mi0rGt4CNmyYg9DgcIYRwRph7ZaKFuIOPC7P+6relvPw92ec+7z0PcruXN+v+91/e7fdZ1zej737+G+m6pCknRke8VMD0CSNPMMA0mSYSBJMgwkSRgGkiQMA0kSPYZBkieTPJTkG0mGW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9EQfxzjVepnzd4AzAJL8Kp0w2NvXUfbXZuDidlfRCmB/VT0zmSect6eJaoyPuEhyFTBcVZuBG+kcTo7QuVhz4cyNeHJ6nO9fAa8B/r5dJ/9OVZ07Y4OepB7nPK/0OOetwMokjwAvA39SVXP1iLfXOX8E+Nskf0TnYvIH5/ALO5J8iU6gL2rXQa4EXglQVZ+lc13kbGAEeAG4ZNL7nMPfL0nSFJnPp4kkST0yDCRJhoEkyTCQJGEYSJIwDCRJGAaSJAwDSRLw/0KZS4q182AKAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.hist(((X-X.min())/(X.max()-X.min())).sample(frac=0.01).to_pandas(), bins=50)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Practice"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Now, it is your turn.<br><br>\n",
    "\n",
    "**ToDo**:\n",
    "<li>Normalize the features: price, TE_ts_weekday_ts_hour_cat_2_brand, CE_cat_2<br>\n",
    "<li>Which normalization technique seems good?"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [],
   "source": [
    "### ToDo"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Text(0.5, 1.0, 'Histogram minmax')"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAA7EAAADSCAYAAACcq0cwAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAAsuUlEQVR4nO3dfbwudV3v/9cbtniLAkKEgG1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8jdtG/488MNjjOXTwE293+asca6baeOezxI9nXjEdRO67s1XtHPBI8YYy37AZ+nqL5cChyxhLDPVEV4OvLy3Xra5bpT2ZUmSJEmSJt5K7E4sSZIkSVqhrMRKkiRJkgbDSqwkSZIkaTCsxEqSJEmSBsNKrCRJkiRpMKzESpIkSZIGw0qsJEmSJGkwrMRKkiRJkgbj/wGWYCpNPOQv3AAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 1152x216 with 4 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "############### Solution ###############\n",
    "cat = 'price'\n",
    "\n",
    "X = df_train[cat]\n",
    "X_norm = (X-X.mean())/X.std()\n",
    "\n",
    "X_log = np.log(X.to_pandas()+1)\n",
    "X_log_norm = (X_log-X_log.mean())/X_log.std()\n",
    "\n",
    "X_minmax = ((X-X.min())/(X.max()-X.min()))\n",
    "\n",
    "fig, axs = plt.subplots(1, 4, figsize=(16,3))\n",
    "axs[0].hist(X.sample(frac=0.01).to_pandas(), bins=50)\n",
    "axs[0].set_title('Histogram non-normalised')\n",
    "axs[1].hist(X_norm.sample(frac=0.01).to_pandas(), bins=50)\n",
    "axs[1].set_title('Histogram normalised')\n",
    "axs[2].hist(X_log_norm.sample(frac=0.01), bins=50)\n",
    "axs[2].set_title('Histogram log-normalised')\n",
    "axs[3].hist(X_minmax.sample(frac=0.01).to_pandas(), bins=50)\n",
    "axs[3].set_title('Histogram minmax')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Text(0.5, 1.0, 'Histogram minmax')"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAA6sAAADSCAYAAACsJ1YRAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6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mZmZmpePKqpmZmZmZmZWOK6tmZmZmZmZWOq6smpmZmZmZWen8f+p4HaukBxozAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 1152x216 with 4 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "cat = 'TE_ts_weekday_ts_hour_cat_2_brand'\n",
    "\n",
    "X = df_train[cat]\n",
    "X_norm = (X-X.mean())/X.std()\n",
    "\n",
    "X_log = np.log(X.to_pandas()+1)\n",
    "X_log_norm = (X_log-X_log.mean())/X_log.std()\n",
    "\n",
    "X_minmax = ((X-X.min())/(X.max()-X.min()))\n",
    "\n",
    "fig, axs = plt.subplots(1, 4, figsize=(16,3))\n",
    "axs[0].hist(X.sample(frac=0.01).to_pandas(), bins=50)\n",
    "axs[0].set_title('Histogram non-normalised')\n",
    "axs[1].hist(X_norm.sample(frac=0.01).to_pandas(), bins=50)\n",
    "axs[1].set_title('Histogram normalised')\n",
    "axs[2].hist(X_log_norm.sample(frac=0.01), bins=50)\n",
    "axs[2].set_title('Histogram log-normalised')\n",
    "axs[3].hist(X_minmax.sample(frac=0.01).to_pandas(), bins=50)\n",
    "axs[3].set_title('Histogram minmax')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Text(0.5, 1.0, 'Histogram minmax')"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAA7EAAADfCAYAAAAgNVTuAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAAthklEQVR4nO3debglZXn3++8PEHAAQWkRGWyjaERNHPooSUwkoohjk5NoNCpgiMSoiXk10SYmAcfgexKnRE1QOYATEo2RCI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vZeG7CSJEnaYtmIlSbHMcAfV9XjgD8D3tvKHwo8NMmXkpyT5MCxRShJkiSN2TbjDkASJLkX8KvAPyeZKt6u/d0G2BvYD9gDODvJo6rq5mUOU5IkSRo7G7HSZNgKuLmqHj3DtPXAuVX1U+BbSb5B16g9bxnjkyRJkiaC3YmlCVBVt9I1UJ8LkM4vt8n/SncVliS70HUvvnIMYUqSJEljZyNWGoMkHwO+DDwsyfokhwEvBA5LciFwCbC6zX4acEOSS4EzgT+vqhvGEbckSZI0bv6LHUmSJEnSYHglVpIkSZI0GDZiJUmSJEmDYSNWkiRJkjQYNmIlSZIkSYNhI1aSJEmSNBg2YiVJkiRJg2EjVpIkSZI0GDZiJUmSJEmD8f8DOw9aVQ8R59QAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 1152x216 with 4 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "cat = 'CE_cat_2'\n",
    "\n",
    "X = df_train[cat]\n",
    "X_norm = (X-X.mean())/X.std()\n",
    "\n",
    "X_log = np.log(X.to_pandas()+1)\n",
    "X_log_norm = (X_log-X_log.mean())/X_log.std()\n",
    "\n",
    "X_minmax = ((X-X.min())/(X.max()-X.min()))\n",
    "\n",
    "fig, axs = plt.subplots(1, 4, figsize=(16,3))\n",
    "axs[0].hist(X.sample(frac=0.01).to_pandas(), bins=50)\n",
    "axs[0].set_title('Histogram non-normalised')\n",
    "axs[1].hist(X_norm.sample(frac=0.01).to_pandas(), bins=50)\n",
    "axs[1].set_title('Histogram normalised')\n",
    "axs[2].hist(X_log_norm.sample(frac=0.01), bins=50)\n",
    "axs[2].set_title('Histogram log-normalised')\n",
    "axs[3].hist(X_minmax.sample(frac=0.01).to_pandas(), bins=50)\n",
    "axs[3].set_title('Histogram minmax')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [],
   "source": [
    "############### Solution End ###########"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Optimisation is skipped"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We shutdown the kernel."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': 'ok', 'restart': False}"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "app = IPython.Application.instance()\n",
    "app.kernel.do_shutdown(False)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
